package com.pacy.pacybaseproject.base;

/**
 * @author PACY
 * 创建时间 19/1/23 09:45.
 * 邮箱 pengwwe457621023@qq.com
 * 类描述 请求返回基类
 */
public class BaseResultBean<T> extends BaseBean {

    /**
     * status : 1
     * msg :  SUCCESS
     * data : null
     */

    private int code;
    private String msg;
    private T data;
    private String requestId;
    private boolean success;

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public void setData(T data) {
        this.data = data;
    }

    public T getData() {
        return data;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }


    public boolean isSuccess() {
        return code == 200;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }


    @Override
    public String toString() {
        return "BaseResultBean{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
//            ", data=" + data.toString() +
                '}';
    }
}
